﻿using System;
using System.Collections.Generic;
using System.Text;
using Antlr.StringTemplate;
using System.Data;
namespace TuKu.Common
{
    public static class TemplateClass
    {
        /// <summary>
        /// 初始化模板引擎
        /// </summary>
        /// <param name="groupName">模板文件名:index.st，不包括扩展名</param>
        /// <returns></returns>
        public static StringTemplate initTemplate(string groupName)
        {
            StringTemplateGroup group = new StringTemplateGroup(groupName, Common.PathClass.templatepath);
            StringTemplate st = group.GetInstanceOf(groupName);
            return st;
        }
    }
    public static class Tag
    {
        /// <summary>
        /// 728x15, 创建于 08-11-11(#6930283015) 
        /// </summary>
        /// <returns></returns>
        public static String GoogleAd_728x15_01()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<script type=\"text/javascript\"><!--\r\n");
            sb.Append("google_ad_client = \"pub-4499067893576491\";\r\n");
            sb.Append("/* 728x15, 创建于 08-11-11 */\r\n");
            sb.Append("google_ad_slot = \"6930283015\";\r\n");
            sb.Append("google_ad_width = 728;\r\n");
            sb.Append("google_ad_height = 15;\r\n");
            sb.Append("//-->\r\n");
            sb.Append("</script>\r\n");
            sb.Append("<script type=\"text/javascript\"\r\n");
            sb.Append("src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\r\n");
            sb.Append("</script>\r\n");
            return sb.ToString();
        }
        /// <summary>
        /// 728x15, 创建于 08-11-7(#4834075940) 
        /// </summary>
        /// <returns></returns>
        public static String GoogleAd_728x15_02()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<script type=\"text/javascript\"><!--\r\n");
            sb.Append("google_ad_client = \"pub-4499067893576491\";\r\n");
            sb.Append("/* 728x15, 创建于 08-11-7 */\r\n");
            sb.Append("google_ad_slot = \"4834075940\";\r\n");
            sb.Append("google_ad_width = 728;\r\n");
            sb.Append("google_ad_height = 15;\r\n");
            sb.Append("//-->\r\n");
            sb.Append("</script>\r\n");
            sb.Append("<script type=\"text/javascript\"\r\n");
            sb.Append("src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\r\n");
            sb.Append("</script>\r\n");
            return sb.ToString();
        }
        /// <summary>
        /// 728x90, 创建于 08-11-4 (#1007516168) 
        /// </summary>
        /// <returns></returns>
        public static String GoogleAd_728x90_01()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<script type=\"text/javascript\"><!--\r\n");
            sb.Append("google_ad_client = \"pub-4499067893576491\";\r\n");
            sb.Append("/* 728x90, 创建于 08-11-4 */\r\n");
            sb.Append("google_ad_slot = \"1007516168\";\r\n");
            sb.Append("google_ad_width = 728;\r\n");
            sb.Append("google_ad_height = 90;\r\n");
            sb.Append("//-->\r\n");
            sb.Append("</script>\r\n");
            sb.Append("<script type=\"text/javascript\"\r\n");
            sb.Append("src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\r\n");
            sb.Append("</script>\r\n");
            return sb.ToString();
        }
        public static String GoogleSearch_01()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<!-- Search Google --> \r\n");
            sb.Append("<center> \r\n");
            sb.Append("<form method=\"get\" action=\"http://www.google.cn/search\" target=\"google_window\"> \r\n");
            sb.Append("<table bgcolor=\"#383838\"> \r\n");
            sb.Append("<tr><td nowrap=\"nowrap\" valign=\"top\" align=\"left\"> \r\n");
            sb.Append("<table bgcolor=\"#383838\"> \r\n");
            sb.Append("<tr><td nowrap=\"nowrap\" valign=\"top\" align=\"left\" height=\"32\"> \r\n");
            sb.Append(" \r\n");
            sb.Append("<label for=\"sbi\" style=\"display: none\">输入您的搜索字词</label> \r\n");
            sb.Append("<input type=\"text\" name=\"q\" size=\"20\" maxlength=\"255\" value=\"\" id=\"sbi\"></input> \r\n");
            sb.Append("<label for=\"sbb\" style=\"display: none\">提交搜索表单</label> \r\n");
            sb.Append("<input type=\"submit\" name=\"sa\" value=\"Google 搜索\" id=\"sbb\"></input> \r\n");
            sb.Append("<input type=\"hidden\" name=\"client\" value=\"pub-4499067893576491\"></input> \r\n");
            sb.Append("<input type=\"hidden\" name=\"forid\" value=\"1\"></input> \r\n");
            sb.Append("<input type=\"hidden\" name=\"prog\" value=\"aff\"></input> \r\n");
            sb.Append("<input type=\"hidden\" name=\"ie\" value=\"GB2312\"></input> \r\n");
            sb.Append("<input type=\"hidden\" name=\"oe\" value=\"GB2312\"></input> \r\n");
            sb.Append("<input type=\"hidden\" name=\"hl\" value=\"zh-CN\"></input> \r\n");
            sb.Append("</td></tr></table> \r\n");
            sb.Append("</td><td nowrap=\"nowrap\" valign=\"top\" align=\"left\"> \r\n");
            sb.Append("<script type=\"text/javascript\"><!-- \r\n");
            sb.Append("  google_ad_client = \"pub-4499067893576491\"; \r\n");
            sb.Append("  google_ad_format = \"200x30_sdo\"; \r\n");
            sb.Append("  google_link_target = 2; \r\n");
            sb.Append("  google_color_bg = \"383838\"; \r\n");
            sb.Append("  google_color_link = \"ffffff\"; \r\n");
            sb.Append("  google_encoding = \"GB2312\"; \r\n");
            sb.Append("//--> \r\n");
            sb.Append("</script> \r\n");
            sb.Append("<script type=\"text/javascript\" \r\n");
            sb.Append("  src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"> \r\n");
            sb.Append("</script> \r\n");
            sb.Append("</td></tr></table> \r\n");
            sb.Append("</form> \r\n");
            sb.Append("</center> \r\n");
            sb.Append("<!-- Search Google -->\r\n");
            return sb.ToString();

        }
        public static string[] cncategory = new string[]{
            "首页",
            "影视",
            "明星",
            "娱乐",
            "时尚",
            "美女",
            "动漫",
            "汽车",
            "社会",
            "风景",
            "桌面",
            "素材",
        };
        public static string[] encategory = new string[]{
            "index",
            "movie",
            "star",
            "et",
            "fashion",
            "mm",
            "anime",
            "auto",
            "community",
            "scenery",
            "desk",
            "material",
        };
    }
}
